#ifndef SELECTIONDRAWER_HEADER_VIZMF_PROJECT
#define SELECTIONDRAWER_HEADER_VIZMF_PROJECT

#include "src/core/generic/selection.h"
#include "molecularvisitors.h"
#include "fieldvisitors.h"
#include <algorithm>

class SelectionDrawer {
public:
  typedef Selection<WorkSpace> selection_type;

//  SelectionDrawer(const selection_type& selection , const VisitorParameters& params) :
//    selection_ (selection), viz_params_(params) {}

  SelectionDrawer(/* const */ selection_type& selection) : selection_ (selection) {}

  void DrawMolecule(MolecularVisitor& visitor) const {
        for (selection_type::atom_leaf_iterator i = selection_.atoms_begin(), e = selection_.atoms_end(); i!=e; ++i)
        {
          visitor.drawAtom(i->coords(), i->element(), "");
        }

        for (selection_type::bond_leaf_iterator i = selection_.bonds_begin(), e = selection_.bonds_end(); i!=e; ++i)
        {
          visitor.drawBond(i->from()->coords(), i->to()->coords(), i->from()->element(), i->to()->element(), "", "", i->order());
        }
  }

protected:
//  const VisitorParameters viz_params_;
  /* const */ selection_type& selection_;
};


#endif // SELECTIONDRAWER_HEADER_VIZMF_PROJECT
